import { useNavigate, history } from 'umi'
export default function Order() {
    let navigate = useNavigate()
    return <div>订单管理
        <button onClick={() => {
            /**
             * navigate('/xxx')
             * navigate(-1)
             * navigate(1)
             * navigate('/xxx',{replace:true,state:{...}})
             * navigate({
             *  pathname:'/xxx',
             *  search:'xxx=xxx&xxx=xxx'
             * })
             * 
             * ----
             * 页面中只要遇到<Navigate/>组件，就可以实现跳转！！
             */
            /* navigate({
                pathname:'/personal/info',
                // search:'lx=123&name=zhangshan'
            }) */
            /*  history.push({
                 pathname:'/personal/info',
                 query:{
                     lx:123,
                     name:'libai'
                 }
             }) */
            navigate('/personal/info', {
                state: {
                    age: 18,
                    name: 'xiaohon'
                }
            })
        }}>点我</button>
    </div>
}
